<?php
/**
 * Created by PhpStorm.
 * User: Tsang
 * Date: 2017/9/24 16:20
 *
 */

namespace app\api\model;

use think\Model;

class ImgList extends Model
{
   public function inquire($where=[]){
        $inquire = db('img_list')->where($where)->select();
        if(empty($inquire)){
            return null;
        }  
        return $inquire;
    }

    /**
     * 创建地址
     * @param $original
     * @return mixed
     */
    public function createImg($original)
    {
        $image_id = ImgList::create($this->dataFormat($original));

        return $image_id->id;
    }
}